import request from '@/router/axios';

export const getList = (current, size, params, tableName) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
            tableName
        }
    })
};

export const getListInfo = (current, size, params,tableName) => {
  return request({
    url: '/api/vingsoft-acceptance/serviceItem/list',
    method: 'get',
    params: {
      ...params,
      tableName,
      current,
      size
    }
  })
};

export const getChildListInfo = (params,tableName) => {
  return request({
    url: '/api/vingsoft-acceptance/serviceItem/childList',
    method: 'get',
    params: {
      ...params,
      tableName
    }
  })
};

export const materialPage = (current, size, params) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/materialPage',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
};

export const getTemplateMaterialList = (taskGuid, taskCode, taskType, materialNos) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/getTemplateMaterialList',
        method: 'get',
        params: {
            taskGuid,
            taskCode,
            taskType,
            materialNos
        }
    })
};

export const preAuditCheck = (projectNo, operateResultCode, itemId, taskCode, taskType) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/preAuditCheck',
        method: 'get',
        params: {
            projectNo,
            operateResultCode,
            itemId,
            taskCode,
            taskType,
        }
    })
};

export const getElecMaterialList = (certNo, typeCode) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/getElecMaterialList',
        method: 'get',
        params: {
            certNo,
            typeCode
        }
    })
};

export const getAllEleCertification = (applyerPageCode, materialZzlxmc) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/getAllEleCertification',
        method: 'post',
        params: {
            applyerPageCode,
            materialZzlxmc
        }
    })
};

export const isHaveColumn = (itemId, taskCode, taskType) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/isHaveColumn',
        method: 'get',
        params: {
            itemId,
            taskCode,
            taskType
        }
    })
};

export const getSpecialPage = (projectNo,current, size) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/getSpecialPage',
        method: 'get',
        params: {
            projectNo,
            current,
            size,
        }
    })
};

export const getLegalInfo = (tyshxydm) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/getLegalInfo',
        method: 'get',
        params: {
            tyshxydm
        }
    })
};

export const getCertificateFileByHolder = (applyerPageCode, materialZzlxmc) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/getCertificateFileByHolder',
        method: 'get',
        params: {
            applyerPageCode,
            materialZzlxmc
        }
    })
};

export const getPersonalInfo = (sfzjh) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/getPersonalInfo',
        method: 'get',
        params: {
            sfzjh
        }
    })
};

export const pushBqbzMaterialToCaseDatabase = (projectNo) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/pushBqbzMaterialToCaseDatabase',
        method: 'get',
        params: {
            projectNo
        }
    })
};

export const createMaterialFileByForm = (taskType, taskCode, taskGuid, form) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/createMaterialFileByForm',
        method: 'get',
        params: {
            taskType,
            taskCode,
            taskGuid,
            form
        }
    })
};

export const personalBlackInfo = (zjhm) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/personalBlackInfo',
        method: 'get',
        params: {
            zjhm
        }
    })
};

export const legalBlackInfo = (zjhm) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/legalBlackInfo',
        method: 'get',
        params: {
            zjhm
        }
    })
};

export const getIndependentElements = (params) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/getIndependentElements',
        method: 'get',
        params: {
            ...params
        }
    })
};

export const getRelatedQuestionAnswer = (params) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/getRelatedQuestionAnswer',
        method: 'get',
        params: {
            ...params
        }
    })
};

export const getFormId = (itemId, rowGuid) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/getFormId',
        method: 'get',
        params: {
            itemId,
            rowGuid
        }
    })
};

export const createMaterialFileByXdForm = (row) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/createMaterialFileByXdForm',
        method: 'post',
        data: row
    })
};

export const getServiceItemByName = (taskCode, taskName, taskType) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/getServiceItemByName',
        method: 'get',
        params: {
            taskCode,
            taskName,
            taskType
        }
    })
};

export const getXdFormData = (formId, rowGuid) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/getXdFormData',
        method: 'get',
        params: {
            formId,
            rowGuid
        }
    })
};

export const getDetailById = (id, taskType) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/getDetailById',
        method: 'get',
        params: {
            id,
            taskType
        }
    })
};

export const getChildrenServiceItemList = (parentId, taskCode, taskType) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/getChildrenServiceItemList',
        method: 'get',
        params: {
            parentId,
            taskCode,
            taskType
        }
    })
};

export const taskList = (current, size, params, tableName, extendName) => {
  return request({
    url: '/api/vingsoft-acceptance/serviceItem/taskList',
    method: 'get',
    params: {
      ...params,
      current,
      size,
      tableName,
      extendName
    }
  })
};

export const materialUploadLicense = (taskType, rowGuid, formUrl, formUrlName, taskGuid, type) => {
  return request({
    url: '/api/vingsoft-acceptance/serviceItem/materialUploadLicense',
    method: 'post',
    params: {
      taskType,
      rowGuid,
      formUrl,
      formUrlName,
      taskGuid,
      type
    }
  })
};

export const getCountMaterialLicense = (taskType, taskGuid) => {
  return request({
    url: '/api/vingsoft-acceptance/serviceItem/getCountMaterialLicense',
    method: 'get',
    params: {
      taskType,
      taskGuid
    }
  })
};

export const taskFlowConfig = (id, taskFlowId, tableName) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/taskFlowConfig',
        method: 'post',
        params: {
            taskFlowId,
            id,
            tableName,
        }
    })
};

export const getTaskFlowIdByItemId = (id, taskCode, taskType, itemId) => {
    return request({
        url: '/api/vingsoft-acceptance/serviceItem/getTaskFlowIdByItemId',
        method: 'post',
        params: {
            id,
            taskCode,
            taskType,
            itemId,
        }
    })
};

export const taskActivityConfig = (tableName,id, itemLevel, taskFlowId) => {
  return request({
    url: '/api/vingsoft-acceptance/serviceItem/taskActivityConfig',
    method: 'post',
    params: {
      tableName,
      id,
      itemLevel,
      taskFlowId
    }
  })
};

export const deleteActivityConfig = (tableName,id) => {
  return request({
    url: '/api/vingsoft-acceptance/serviceItem/deleteActivityConfig',
    method: 'post',
    params: {
      tableName,
      id
    }
  })
};

export const getTaskFeeProject = (itemId) => {
  return request({
    url: '/api/vingsoft-acceptance/serviceItem/getTaskFeeProject',
    method: 'get',
    params: {
      itemId
    }
  })
};

export const getServiceItemByItemId = (itemId) => {
  return request({
    url: '/api/vingsoft-acceptance/serviceItem/getServiceItemByItemId',
    method: 'get',
    params: {
      itemId
    }
  })
};

export const saveIsSendsms = (tableName,id,isSendsms) => {
  return request({
    url: '/api/vingsoft-acceptance/serviceItem/saveIsSendsms',
    method: 'post',
    params: {
      tableName,
      id,
      isSendsms
    }
  })
};

export const getServCertModelByItemId = (itemId) => {
  return request({
    url: '/api/vingsoft-acceptance/taskgeneralbasic/getServCertModelByItemId',
    method: 'get',
    params: {
      itemId
    }
  })
};

export const getResultTypeByItemId = (itemId) => {
    return request({
        url: '/api/vingsoft-acceptance/client/get-resulttype-by-itemid',
        method: 'get',
        params: {
            itemId
        }
    })
};
